<template>
  <section class="intro-section animate__animated animate__fadeInUp">
    <h2>课程简介 <a href="#">更多>></a></h2>
    <div class="intro-list">
      <div class="intro-item" v-for="intro in intros" :key="intro.id">
        <div class="intro-title">{{ intro.title }}</div>
        <div class="intro-content">{{ intro.content }}</div>
      </div>
    </div>
  </section>
</template>

<script>
export default {
  name: 'IntroSection',
  props: {
    intros: {
      type: Array,
      required: true
    }
  }
};
</script>

<style>
.intro-section {
  margin-bottom: 2rem;
}

.intro-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.intro-item {
  background-color: rgba(255, 255, 255, 0.8); /* 磨砂效果 */
  backdrop-filter: blur(10px); /* 磨砂效果 */
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  flex: 1 1 calc(33.333% - 1rem); /* Three items per row */
  box-sizing: border-box;
  transition: transform 0.3s, box-shadow 0.3s; /* 添加动画效果 */
}

.intro-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.intro-title {
  font-weight: bold;
}

.intro-content {
  color: #888;
}
</style>
